-- dlc_puzzle_scrap
-- created by huanghr
-- 道具描述：迷宫碎片

return {
    -- 获取道具描述
    getDesc = function(itemId, args, para)
        local desc = getLocStr("script_desc_dlc_puzzle");
        local detail;

        if para["gain_way"] then
            -- 获取途径(商城查看未获得)
            detail = string.format(getLocStr("dlc_puzzle_gain_desc"), DungeonPuzzleM.query(itemId, "path"));

            desc = desc .. detail;
        elseif para["bonus_detail"] then
            -- 奖励获得后的描述
            local areaId = DungeonPuzzleM.query(itemId, "dungeon_area");
            local areaName = DungeonAreaM.query(areaId, "name");

            detail = getLocStr("script_desc_dlc_puzzle2");

            detail = string.format(detail, areaName);

            desc = desc .. "\n\n" .. detail;
        end

        return desc;
    end,

    getDetail = function(itemId, args, para)
        local areaId = DungeonPuzzleM.query(itemId, "dungeon_area");
        local areaName = DungeonAreaM.query(areaId, "name");

        local haveAmount = #DungeonPuzzleM.getPuzzleList(areaId);

        local detail;

        detail = getLocStr("script_desc_dlc_puzzle3");

        detail = string.format(detail, areaName, haveAmount);

        return detail;
    end,
};
